<div class="faraday-page-header" class="clearfix">
    <div class="head">
        <a href="#/" class="ws-dashboard" uib-tooltip="{{version}}" tooltip-placement="bottom" style="margin-right: 20px;">
            <img class="" style="margin: 0.5rem;" src="../../../images/logo-faraday-blanco.svg" alt="Faraday home | WS Dashboard"/>
        </a>
    </div>
    <div class="workspace-selector-wrapper">
        <div ng-if="showSwitcher() && workspace" class="switcher-wrapper">
            <div class="dropdown">
                <button id="workspaceSwitcher" type="button" class="btn btn-default dropdown-toggle workspace-switcher" data-toggle="dropdown" title="Change current workspace">
                    <div class="workspace-switcher-title-wrapper">
                        <div class="workspace-switcher-title">
                            <span class="title">
                                {{ workspace }}
                            </span>
                            <span class="caret-container">
                                <span class="caret"></span>
                            </span>
                        </div>
                        <span class="subtitle">
                            {{vulnsNum}}/{{totalVulns}} vulns
                        </span>
                    </div>
                </button>
                <ul class="dropdown-menu" role="menu" aria-labelledby="workspaceSwitcher">
                    <li ng-repeat="ws in workspaces | filter:{active:true}"><a href="#/{{location}}/ws/{{ws.name}}" class="ws" >{{ws.name}}</a></li>
                </ul>
            </div>
        </div>
    </div>
    <div>
        <div class="wrapper">
            <div ng-controller="navigationCtrl" ng-include="'scripts/navigation/partials/topBar.html'"></div>
        </div>
    </div>
    <div class="controls-wrapper">
        <button ng-if="workspace" id="refresh" type="button" class="btn" title="Refresh current workspace" onclick="location.reload()">
            <span class="glyphicon glyphicon-refresh"></span>
        </button>
        <button ng-if="showSwitcher() && workspace" type="button" class="btn" title="Edit current workspace" ng-click="editWorkspace()">
            <span class="glyphicon glyphicon-cog"></span>
        </button>
        <span ng-if="location === 'dashboard' && workspace" class="control-wrapper filter-wrapper">
            <button type="button" class="btn confirm-button" title="{{ confirmed === true ? 'All vulns' : 'Confirmed vulns' }}" ng-click="toggleConfirmed()">
                <img ng-src="{{ confirmed === true ? 'images/icon-toolbar-confirmed-on.svg' : 'images/icon-toolbar-confirmed-off.svg'}}" class="confirm-icon" ng-style="{ 'opacity': (confirmed === true) ? '1' : '0.7' }" />
            </button>
        </span>
    </div>
    <div class="flex-spacer"></div>
    <div class="user-menu-wrapper">
        <div ng-controller="loginBarCtrl">
            <div class="btn-group dropdown" ng-if="auth" uib-dropdown="" is-open="status.isopen">
                <button id="single-button" type="button" class="btn btn-default dropdown-toggle user-dropdown" uib-dropdown-toggle="" ng-disabled="disabled" aria-haspopup="true" aria-expanded="true">
                    <span>{{user.name}} </span>
                    <i class="glyphicon glyphicon-user"></i>
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu dropdown-menu-right overall" uib-dropdown-menu="" role="menu" aria-labelledby="single-button">
                    <li role="menuitem"><a href="#/workspaces">Workspaces</a></li>
                    <li role="menuitem"><a href="#/users">Users</a></li>
                    <li role="menuitem"><a href="#/licenses">Licenses</a></li>
                    <hr class="hr_divider"></hr>
                    <li role="menuitem"><a href="" ng-click="changePasswordModal()">Change password</a></li>
                    <li role="menuitem"><a href="#/admin">Settings</a></li>
                    <li role="menuitem"><a href="" ng-click="logout()">Logout</a></li>
                    <hr class="hr_divider"></hr>
                    <li role="menuitem"><a href="#/help">Help</a></li>
                    <li role="menuitem"><a href="" ng-click="about()">About</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>
